package com.zzt.aop.proxy;

/**
 * Created with IntelliJ IDEA.
 * Description
 * User: panda
 * Date: 2025-03-30
 * Time: 15:58
 */
public class HouseProxy implements HouseSubject{

    private HouseSubject realHouseSubject;

    public HouseProxy(HouseSubject realHouseSubject) {
        this.realHouseSubject = realHouseSubject;
    }

    @Override
    public void saleHouse() {
        System.out.println("我是中介，我帮房东开始代理");
        realHouseSubject.saleHouse();
        System.out.println("我是中介，我帮房东结束代理");
    }

    @Override
    public void rentHouse() {
        System.out.println("我是中介，我帮房东开始代理");
        realHouseSubject.rentHouse();
        System.out.println("我是中介，我帮房东结束代理");
    }
}
